package com.eduction.service;

import java.sql.SQLException;
import java.util.List;
import java.util.Map;

import com.eduction.common.dbutil.page.Page;
import com.eduction.modules.system.entity.CityEntity;
import com.eduction.modules.system.entity.QuestionnaireSurvey;
import com.eduction.modules.system.entity.School;
import com.eduction.modules.system.entity.SchoolType;

public interface SchoolService {

	public School querySchoolByAccount(String account) throws SQLException;
	
	public void saveSchool(School s)  throws SQLException;

	public void updateState(School s)  throws SQLException;



	public void resetPassword(String id,String password)  throws SQLException;
	
	/**
	 * 分页查询学校
	 * @throws SQLException 
	 * @throws NumberFormatException 
	 */
	public Page<School> querySchoolByPage(Map<String ,String> map) throws SQLException;

	/**
	 * 根据年份查询学校
	 * @param year
	 * @return
	 * @throws SQLException
	 */
	List<School> querySchoolByYear(String year) throws SQLException;

	/**
	 * 查询江苏省所有城市
	 * @return
	 * @throws SQLException
	 */
	public List<CityEntity> queryCities() throws SQLException;
	
	/**
	 * 查询所有类型
	 * @return
	 * @throws SQLException
	 */
	public List<SchoolType> querySchoolType() throws SQLException;
	
	public void deleteSchool(String pid) throws SQLException;
	
	/**
	 * 查询未绑定专家组的学校
	 */
	public List<School> querySchoolNotBand() throws SQLException;

	/**
	 * 查询未绑定专家组的学校
	 */
	public List<School> querySchoolNotBand2() throws SQLException;
	
	/**
	 * 查询某个专家所在的组绑定的学校
	 */
	public List<School> querySchoolByExpert(String expertId) throws SQLException;
	
	/**
	 * 根据id查学校名称
	 * @throws SQLException 
	 */
	public School queryNameById(String id) throws SQLException;
	
	/**
	 * 查询单个学校
	 */
	public School querySchoolById(String id) throws SQLException;
	
	/**
	 * 根据id查学校
	 * @throws SQLException 
	 */
	public School queryById(String id) throws SQLException;

	/**
	 * 根据学校类型查询学校集合
	 * @param schoolType
	 * @return
	 */
    List<School> queryBySchoolType(String schoolType)throws SQLException;

	void resetSchoolStateBySchool(String schoolId) throws SQLException;

	/**
	 * 根据专家id查询专家绑定学校
	 * @param expertId
	 * @return
	 */
	List<School> querySchoolByExpertOne(String expertId) throws SQLException;

	/**
	 * 保存问卷调查二维码
	 * @param qs
	 */
	void saveQuestionnaireSurvey(QuestionnaireSurvey qs) throws SQLException;

    QuestionnaireSurvey getTbCodeUrl(String schoolId) throws SQLException;
}
